import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import UserView from "@/views/UsersView/UserView";
import AddUserView from "@/views/UsersView/AddUserView";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    },
    {
        path: '/User',
        name: 'User',
        component: UserView
    },
    {
        path: '/AddUser',
        name: 'AddUser',
        component: () => import("../views/UsersView/AddUserView")
    },
    {
        path: '/EditUser',
        name: 'EditUser',
        component: () => import("../views/UsersView/EditUserView")
    },
    {
        path: '/Animal',
        name: 'Animal',
        component: () => import("../views/AnimalsView/AnimalView")
    },
    {
        path: '/AddAnimal',
        name: 'AddAnimal',
        component: () => import("../views/AnimalsView/AddAnimalView")
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
